package com.example.myblog_sm.dao;

import com.example.myblog_sm.model.Userinfo;
import com.example.myblog_sm.model.Vo.UserinfoVo;
import org.apache.ibatis.annotations.*;

@Mapper
public interface UserMapper {
    @Insert("insert into userinfo(username,password) values(#{username},#{password})")
    int reg(Userinfo userinfo);
    @Select("select * from userinfo where username = #{username}")
    Userinfo getUserByName(@Param("username")String username);
    @Select("select *from userinfo where id = #{uid}")
    UserinfoVo getUserById(@Param("uid") int uid);

}
